<?php

    // TITLE:
    // FILE:
    // AUTHOR:
    // DATE:
    
?>

<h3>Sub Event: <?php echo $subEvent->getTitle(); ?></h3>

<input type="hidden" name="id" value="<?php echo $subEvent->getId(); ?>"
<input type="text" name="title" value="<?php echo $subEvent->getTitle(); ?>">

<h4>Location</h4>

<select name="location">
    <?php foreach ($locations as $location) {
        $id = $location->getId();
        $title = $location->getTitle();
        $selected = ($id == $locationId) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $title . '</option>';}
    ?>
</select>

<h4>Time</h4>

<select name="startHour">
    <?php for ($i = 0; $i < 24; $i++) {
        $selected = ($i == $eventStartHour) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>
:
<select name="startMinute">
    <?php for ($i = 0; $i < 60; $i++) {
        $selected = ($i == $eventStartMinute) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>
 - 
<select name="endHour">
    <?php for ($i = 0; $i < 24; $i++) {
        $selected = ($i == $eventEndHour) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>
:
<select name="endMinute">
    <?php for ($i = 0; $i < 60; $i++) {
        $selected = ($i == $eventEndMinute) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>